package com.wjw.cloud.common.api;

public enum ResultCode implements IErrorCode {
    SUCCESS(200, "操作成功"),
    FAILED(500, "操作失败"),
    /**微信公众号前端 begin **/
    LOGIN_ERROR(100, "用户登录请求出错"),
    ORGAN_CODE_ERROR(101, "医疗机构编码输入有误"),
    ORGAN_NAME_ERROR(102, "服务机构名称输入有误"),
    USER_BIND_ERROR(103, "用户绑定机构请求出错"),
    ORGAN_ALREADY_BIND_ERROR(104, "该医疗机构已绑定"),
    WARN(105, "失败"),
    SMS_INVALID(106, "发送短信失败"),
    SMS_IS_EMPTY(107, "短信验证码不能为空"),
    SMS_CODE_INVALID(108, "短信验证码不正确"),
    GET_WECHAT_ACCESS_TOKEN_ERROR(109,"获取accessToken出现错误"),
    GET_WECHAT_BASE_ACCESS_TOKEN_ERROR(110,"获取BaseAccessToken出现错误"),
    WECHAT_TOKEN_ERROR(111,"微信token过期,重新获取"),
    WECHAT_HTTP_ERROR(112,"请求微信接口获取用户信息出错"),
    ERROR_HTTP(113, "HTTP请求出错"),
    /**微信公众号前端 end **/
    VALIDATE_FAILED(404, "参数检验失败"),
    UNAUTHORIZED(401, "暂未登录或token已经过期"),
    FORBIDDEN(403, "没有相关权限");
    private long code;
    private String message;

    private ResultCode(long code, String message) {
        this.code = code;
        this.message = message;
    }

    public long getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
